<?php
namespace WDB\Wrapper\User;
use WDB;
/**
 *
 * @author Richard Ejem <r.ejem9 gmail.com>
 */
class ProductAdminTable extends WDB\Wrapper\Table
{
    protected function init()
    {
        parent::init();
        $imageColumn = new ImageColumn('productImage', $this, 'id_product',
                array(
                    'list'=>new \ImageTarget(WWW_DIR.'/images/products/pr-*.jpg', \Nette\Environment::getHttpRequest()->getUrl()->getBasePath().'/images/products/pr-*.jpg', 190, 162),
                    'detail'=>new \ImageTarget(WWW_DIR.'/images/products/prDetail-*.jpg', \Nette\Environment::getHttpRequest()->getUrl()->getBasePath().'/images/products/prDetail-*.jpg', 401, 342),
                    ), 'list');
        $imageColumn->setTitle('Fotka produktu');
        $this->addColumn($imageColumn);
    }
}
